import { createSSRApp } from "vue";
import { createPinia } from "pinia";
import App from "./App.vue";
import Button from "./components/Button/index.vue";
import Container from "./components/Container/index.vue";
import Flex from "./components/Layout/Flex.vue";
import "./styles/global.scss";
import "./styles/public.scss";
import share from "./utils/share";
// import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
export function createApp() {
  const app = createSSRApp(App);
  const pinia = createPinia();
  // pinia.use(piniaPluginPersistedstate);

  app.use(pinia);
  app.mixin(share);
  app.component("Flex", Flex);
  app.component("TButton", Button);
  app.component("Container", Container);
  return {
    app
  };
}
